#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>
#include<malloc.h>
#include<assert.h>

typedef struct ListNode
{
	int data;
	struct ListNode* next;
}LT;
int main()
{
	LT* n1 = (LT*)malloc(sizeof(LT));
	LT* n2 = (LT*)malloc(sizeof(LT));
	LT* n3 = (LT*)malloc(sizeof(LT));
	LT* n4 = (LT*)malloc(sizeof(LT));
	assert(n1 && n2 && n3 && n4);
	/*assert(n2);
	assert(n3);
	assert(n4);*/
	n1->data = 1;
	n2->data = 2;
	n3->data = 3;
	n4->data = 4;
	n1->next = n2;
	n2->next = n3;
	n3->next = n4;
	n4->next = NULL;
	while (n1)
		{
			printf("%d->", n1->data);
			n1 = n1->next;
		}
	printf("NULL\n");

	free(n1);
	free(n2);
	free(n3);
	free(n4);
	return 0;
}